home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / devel / lang / lisp / stk-3.002 / stk-3 / STk-3.1 / Doc / Reference / Appendix-C.tex / node7_ct.html < prev    next >
LaTeX Document  |  1996-01-21  |  7.8 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: LaTeX Document (document/latex).

You can browse this item here: node7_ct.html

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert LaTeX Document (document/latex) magic Supported
90% dexvert Hypertext Markup Language File (text/html) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file HTML document text default (weak)
99% file LaTeX document text default
98% file exported SGML document text default
97% file exported SGML document, ASCII text default
80% TrID HyperText Markup Language with DOCTYPE default
19% TrID HyperText Markup Language default
100% checkBytes Printable ASCII default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/281 LaTeX (Subdocument) default
100% gt2 HTML (Hyper Text Markup Language) Datei default
100% detectItEasy Format: plain text[LF] default (weak)
100% xdgMime text/html default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 3c 21 44 4f 43 54 59 50 | 45 20 48 54 4d 4c 20 50 |<!DOCTYP|E HTML P|
|00000010| 55 42 4c 49 43 20 22 2d | 2f 2f 57 33 43 2f 2f 44 |UBLIC "-|//W3C//D|
|00000020| 54 44 20 48 54 4d 4c 20 | 33 2e 32 20 46 69 6e 61 |TD HTML |3.2 Fina|
|00000030| 6c 2f 2f 65 6e 22 3e 0a | 0a 3c 21 2d 2d 43 6f 6e |l//en">.|.<!--Con|
|00000040| 76 65 72 74 65 64 20 77 | 69 74 68 20 4c 61 54 65 |verted w|ith LaTe|
|00000050| 58 32 48 54 4d 4c 20 32 | 30 32 32 20 28 52 65 6c |X2HTML 2|022 (Rel|
|00000060| 65 61 73 65 64 20 4a 61 | 6e 75 61 72 79 20 31 2c |eased Ja|nuary 1,|
|00000070| 20 32 30 32 32 29 20 2d | 2d 3e 0a 3c 48 54 4d 4c | 2022) -|->.<HTML|
|00000080| 20 6c 61 6e 67 3d 22 65 | 6e 22 3e 0a 3c 48 45 41 | lang="e|n">.<HEA|
|00000090| 44 3e 0a 3c 54 49 54 4c | 45 3e 43 6f 6e 74 65 6e |D>.<TITL|E>Conten|
|000000a0| 74 73 20 6f 66 20 53 6c | 6f 74 20 64 65 73 63 72 |ts of Sl|ot descr|
|000000b0| 69 70 74 69 6f 6e 3c 2f | 54 49 54 4c 45 3e 0a 0a |iption</|TITLE>..|
|000000c0| 3c 4d 45 54 41 20 48 54 | 54 50 2d 45 51 55 49 56 |<META HT|TP-EQUIV|
|000000d0| 3d 22 43 6f 6e 74 65 6e | 74 2d 54 79 70 65 22 20 |="Conten|t-Type" |
|000000e0| 43 4f 4e 54 45 4e 54 3d | 22 74 65 78 74 2f 68 74 |CONTENT=|"text/ht|
|000000f0| 6d 6c 3b 20 63 68 61 72 | 73 65 74 3d 75 74 66 2d |ml; char|set=utf-|
|00000100| 38 22 3e 0a 3c 4d 45 54 | 41 20 4e 41 4d 45 3d 22 |8">.<MET|A NAME="|
|00000110| 76 69 65 77 70 6f 72 74 | 22 20 43 4f 4e 54 45 4e |viewport|" CONTEN|
|00000120| 54 3d 22 77 69 64 74 68 | 3d 64 65 76 69 63 65 2d |T="width|=device-|
|00000130| 77 69 64 74 68 2c 20 69 | 6e 69 74 69 61 6c 2d 73 |width, i|nitial-s|
|00000140| 63 61 6c 65 3d 31 2e 30 | 22 3e 0a 3c 4d 45 54 41 |cale=1.0|">.<META|
|00000150| 20 4e 41 4d 45 3d 22 47 | 65 6e 65 72 61 74 6f 72 | NAME="G|enerator|
|00000160| 22 20 43 4f 4e 54 45 4e | 54 3d 22 4c 61 54 65 58 |" CONTEN|T="LaTeX|
|00000170| 32 48 54 4d 4c 20 76 32 | 30 32 32 22 3e 0a 0a 3c |2HTML v2|022">..<|
|00000180| 4c 49 4e 4b 20 52 45 4c | 3d 22 53 54 59 4c 45 53 |LINK REL|="STYLES|
|00000190| 48 45 45 54 22 20 48 52 | 45 46 3d 22 41 70 70 65 |HEET" HR|EF="Appe|
|000001a0| 6e 64 69 78 2d 43 2e 63 | 73 73 22 3e 0a 0a 3c 4c |ndix-C.c|ss">..<L|
|000001b0| 49 4e 4b 20 52 45 4c 3d | 22 6e 65 78 74 22 20 48 |INK REL=|"next" H|
|000001c0| 52 45 46 3d 22 6e 6f 64 | 65 38 5f 6d 6e 2e 68 74 |REF="nod|e8_mn.ht|
|000001d0| 6d 6c 22 3e 0a 3c 4c 49 | 4e 4b 20 52 45 4c 3d 22 |ml">.<LI|NK REL="|
|000001e0| 70 72 65 76 69 6f 75 73 | 22 20 48 52 45 46 3d 22 |previous|" HREF="|
|000001f0| 6e 6f 64 65 36 5f 6d 6e | 2e 68 74 6d 6c 22 3e 0a |node6_mn|.html">.|
|00000200| 3c 4c 49 4e 4b 20 52 45 | 4c 3d 22 75 70 22 20 48 |<LINK RE|L="up" H|
|00000210| 52 45 46 3d 22 6e 6f 64 | 65 34 5f 6d 6e 2e 68 74 |REF="nod|e4_mn.ht|
|00000220| 6d 6c 22 3e 0a 3c 4c 49 | 4e 4b 20 52 45 4c 3d 22 |ml">.<LI|NK REL="|
|00000230| 6e 65 78 74 22 20 48 52 | 45 46 3d 22 6e 6f 64 65 |next" HR|EF="node|
|00000240| 38 5f 6d 6e 2e 68 74 6d | 6c 22 3e 0a 3c 2f 48 45 |8_mn.htm|l">.</HE|
|00000250| 41 44 3e 0a 20 0a 3c 42 | 4f 44 59 20 62 67 63 6f |AD>. .<B|ODY bgco|
|00000260| 6c 6f 72 3d 22 23 66 66 | 66 66 66 66 22 20 74 65 |lor="#ff|ffff" te|
|00000270| 78 74 3d 22 23 30 30 30 | 30 30 30 22 20 6c 69 6e |xt="#000|000" lin|
|00000280| 6b 3d 22 23 39 39 34 34 | 45 45 22 20 76 6c 69 6e |k="#9944|EE" vlin|
|00000290| 6b 3d 22 23 30 30 30 30 | 66 66 22 20 61 6c 69 6e |k="#0000|ff" alin|
|000002a0| 6b 3d 22 23 30 30 66 66 | 30 30 22 3e 0a 0a 3c 48 |k="#00ff|00">..<H|
|000002b0| 32 3e 3c 41 20 49 44 3d | 22 53 45 43 54 49 4f 4e |2><A ID=|"SECTION|
|000002c0| 30 30 30 33 33 30 30 30 | 30 30 30 30 30 30 30 30 |00033000|00000000|
|000002d0| 30 30 30 30 22 3e 3c 2f | 41 3e 0a 3c 41 20 49 44 |0000"></|A>.<A ID|
|000002e0| 3d 22 73 6c 6f 74 2d 64 | 65 73 63 72 69 70 74 69 |="slot-d|escripti|
|000002f0| 6f 6e 22 3e 3c 2f 41 3e | 0a 3c 42 52 3e 0a 53 6c |on"></A>|.<BR>.Sl|
|00000300| 6f 74 20 64 65 73 63 72 | 69 70 74 69 6f 6e 0a 3c |ot descr|iption.<|
|00000310| 2f 48 32 3e 0a 0a 3c 50 | 3e 0a 57 68 65 6e 20 73 |/H2>..<P|>.When s|
|00000320| 70 65 63 69 66 79 69 6e | 67 20 61 20 73 6c 6f 74 |pecifyin|g a slot|
|00000330| 2c 20 61 20 73 65 74 20 | 6f 66 20 6f 70 74 69 6f |, a set |of optio|
|00000340| 6e 73 20 63 61 6e 20 62 | 65 20 67 69 76 65 6e 20 |ns can b|e given |
|00000350| 74 6f 20 74 68 65 20 73 | 79 73 74 65 6d 2e 20 45 |to the s|ystem. E|
|00000360| 61 63 68 20 6f 70 74 69 | 6f 6e 20 0a 69 73 20 73 |ach opti|on .is s|
|00000370| 70 65 63 69 66 69 65 64 | 20 77 69 74 68 20 61 20 |pecified| with a |
|00000380| 6b 65 79 77 6f 72 64 6b | 65 79 77 6f 72 64 2e 20 |keywordk|eyword. |
|00000390| 54 68 65 20 6c 69 73 74 | 20 6f 66 20 61 75 74 68 |The list| of auth|
|000003a0| 6f 72 69 73 65 64 20 6b | 65 79 77 6f 72 64 73 20 |orised k|eywords |
|000003b0| 69 73 20 0a 67 69 76 65 | 6e 20 62 65 6c 6f 77 3a |is .give|n below:|
|000003c0| 0a 0a 3c 55 4c 3e 0a 3c | 4c 49 3e 3c 54 54 3e 3a |..<UL>.<|LI><TT>:|
|000003d0| 69 6e 69 74 66 6f 72 6d | 3c 2f 54 54 3e 3a 69 6e |initform|</TT>:in|
|000003e0| 69 74 66 6f 72 6d 64 65 | 66 61 75 6c 74 20 73 6c |itformde|fault sl|
|000003f0| 6f 74 20 76 61 6c 75 65 | 20 0a 70 65 72 6d 69 74 |ot value| .permit|
|00000400| 73 20 74 6f 20 73 75 70 | 70 6c 79 20 61 20 64 65 |s to sup|ply a de|
|00000410| 66 61 75 6c 74 20 76 61 | 6c 75 65 20 66 6f 72 20 |fault va|lue for |
|00000420| 74 68 65 20 73 6c 6f 74 | 2e 20 54 68 69 73 20 64 |the slot|. This d|
|00000430| 65 66 61 75 6c 74 20 76 | 61 6c 75 65 20 69 73 20 |efault v|alue is |
|00000440| 6f 62 74 61 69 6e 65 64 | 0a 62 79 20 65 76 61 6c |obtained|.by eval|
|00000450| 75 61 74 69 6e 67 20 74 | 68 65 20 66 6f 72 6d 20 |uating t|he form |
|00000460| 67 69 76 65 6e 20 61 66 | 74 65 72 20 74 68 65 20 |given af|ter the |
|00000470| 3c 54 54 3e 3a 69 6e 69 | 74 66 6f 72 6d 3c 2f 54 |<TT>:ini|tform</T|
|00000480| 54 3e 20 69 6e 20 74 68 | 65 20 67 6c 6f 62 61 6c |T> in th|e global|
|00000490| 0a 65 6e 76 69 72 6f 6e | 6d 65 6e 74 74 6f 70 20 |.environ|menttop |
|000004a0| 6c 65 76 65 6c 20 65 6e | 76 69 72 6f 6e 6d 65 6e |level en|vironmen|
|000004b0| 74 2e 0a 0a 3c 50 3e 0a | 3c 2f 4c 49 3e 0a 3c 4c |t...<P>.|</LI>.<L|
|000004c0| 49 3e 3c 54 54 3e 3a 69 | 6e 69 74 2d 6b 65 79 77 |I><TT>:i|nit-keyw|
|000004d0| 6f 72 64 3c 2f 54 54 3e | 3a 69 6e 69 74 2d 6b 65 |ord</TT>|:init-ke|
|000004e0| 79 77 6f 72 64 20 70 65 | 72 6d 69 74 73 20 74 6f |yword pe|rmits to|
|000004f0| 20 73 70 65 63 69 66 79 | 20 74 68 65 20 0a 6b 65 | specify| the .ke|
|00000500| 79 77 6f 72 64 20 66 6f | 72 20 69 6e 69 74 69 61 |yword fo|r initia|
|00000510| 6c 69 7a 69 6e 67 20 61 | 20 73 6c 6f 74 2e 20 54 |lizing a| slot. T|
|00000520| 68 65 20 69 6e 69 74 2d | 6b 65 79 77 6f 72 64 20 |he init-|keyword |
|00000530| 6d 61 79 20 62 65 20 70 | 72 6f 76 69 64 65 64 20 |may be p|rovided |
|00000540| 0a 64 75 72 69 6e 67 20 | 69 6e 73 74 61 6e 63 65 |.during |instance|
|00000550| 20 63 72 65 61 74 69 6f | 6e 20 28 69 2e 65 2e 20 | creatio|n (i.e. |
|00000560| 69 6e 20 74 68 65 20 6d | 61 6b 65 20 6f 70 74 69 |in the m|ake opti|
|00000570| 6f 6e 61 6c 20 70 61 72 | 61 6d 65 74 65 72 20 6c |onal par|ameter l|
|00000580| 69 73 74 29 2e 20 53 70 | 65 63 69 66 79 69 6e 67 |ist). Sp|ecifying|
|00000590| 20 0a 73 75 63 68 20 61 | 20 6b 65 79 77 6f 72 64 | .such a| keyword|
|000005a0| 20 64 75 72 69 6e 67 20 | 69 6e 73 74 61 6e 63 65 | during |instance|
|000005b0| 20 69 6e 69 74 69 61 6c | 69 7a 61 74 69 6f 6e 20 | initial|ization |
|000005c0| 77 69 6c 6c 20 73 75 70 | 65 72 73 65 64 65 20 74 |will sup|ersede t|
|000005d0| 68 65 20 0a 64 65 66 61 | 75 6c 74 20 73 6c 6f 74 |he .defa|ult slot|
|000005e0| 20 69 6e 69 74 69 61 6c | 69 7a 61 74 69 6f 6e 20 | initial|ization |
|000005f0| 70 6f 73 73 69 62 6c 79 | 20 67 69 76 65 6e 20 77 |possibly| given w|
|00000600| 69 74 68 20 3c 54 54 3e | 3a 69 6e 69 74 66 6f 72 |ith <TT>|:initfor|
|00000610| 6d 3c 2f 54 54 3e 2e 0a | 0a 3c 50 3e 0a 3c 2f 4c |m</TT>..|.<P>.</L|
|00000620| 49 3e 0a 3c 4c 49 3e 3c | 54 54 3e 3a 67 65 74 74 |I>.<LI><|TT>:gett|
|00000630| 65 72 3c 2f 54 54 3e 3a | 67 65 74 74 65 72 20 70 |er</TT>:|getter p|
|00000640| 65 72 6d 69 74 73 20 74 | 6f 20 73 75 70 70 6c 79 |ermits t|o supply|
|00000650| 20 74 68 65 20 6e 61 6d | 65 20 66 6f 72 20 74 68 | the nam|e for th|
|00000660| 65 20 0a 73 6c 6f 74 20 | 67 65 74 74 65 72 67 65 |e .slot |getterge|
|00000670| 74 74 65 72 2e 20 54 68 | 65 20 6e 61 6d 65 20 62 |tter. Th|e name b|
|00000680| 69 6e 64 69 6e 67 20 69 | 73 20 64 6f 6e 65 20 69 |inding i|s done i|
|00000690| 6e 20 74 68 65 20 67 6c | 6f 62 61 6c 20 0a 65 6e |n the gl|obal .en|
|000006a0| 76 69 72 6f 6e 6d 65 6e | 74 74 6f 70 20 6c 65 76 |vironmen|ttop lev|
|000006b0| 65 6c 20 65 6e 76 69 72 | 6f 6e 6d 65 6e 74 2e 0a |el envir|onment..|
|000006c0| 0a 3c 50 3e 0a 3c 2f 4c | 49 3e 0a 3c 4c 49 3e 3c |.<P>.</L|I>.<LI><|
|000006d0| 54 54 3e 3a 73 65 74 74 | 65 72 3c 2f 54 54 3e 3a |TT>:sett|er</TT>:|
|000006e0| 73 65 74 74 65 72 20 70 | 65 72 6d 69 74 73 20 74 |setter p|ermits t|
|000006f0| 6f 20 73 75 70 70 6c 79 | 20 74 68 65 20 6e 61 6d |o supply| the nam|
|00000700| 65 20 66 6f 72 20 74 68 | 65 20 0a 73 6c 6f 74 20 |e for th|e .slot |
|00000710| 73 65 74 74 65 72 73 65 | 74 74 65 72 2e 20 54 68 |setterse|tter. Th|
|00000720| 65 20 6e 61 6d 65 20 62 | 69 6e 64 69 6e 67 20 69 |e name b|inding i|
|00000730| 73 20 64 6f 6e 65 20 69 | 6e 20 74 68 65 20 67 6c |s done i|n the gl|
|00000740| 6f 62 61 6c 20 0a 65 6e | 76 69 72 6f 6e 6d 65 6e |obal .en|vironmen|
|00000750| 74 74 6f 70 20 6c 65 76 | 65 6c 20 65 6e 76 69 72 |ttop lev|el envir|
|00000760| 6f 6e 6d 65 6e 74 2e 0a | 0a 3c 50 3e 0a 3c 2f 4c |onment..|.<P>.</L|
|00000770| 49 3e 0a 3c 4c 49 3e 3c | 54 54 3e 3a 61 63 63 65 |I>.<LI><|TT>:acce|
|00000780| 73 73 6f 72 3c 2f 54 54 | 3e 3a 61 63 63 65 73 73 |ssor</TT|>:access|
|00000790| 6f 72 20 70 65 72 6d 69 | 74 73 20 74 6f 20 73 75 |or permi|ts to su|
|000007a0| 70 70 6c 79 20 74 68 65 | 20 6e 61 6d 65 20 66 6f |pply the| name fo|
|000007b0| 72 20 74 68 65 20 0a 73 | 6c 6f 74 20 61 63 63 65 |r the .s|lot acce|
|000007c0| 73 73 6f 72 61 63 63 65 | 73 73 6f 72 2e 20 54 68 |ssoracce|ssor. Th|
|000007d0| 65 20 6e 61 6d 65 20 62 | 69 6e 64 69 6e 67 20 69 |e name b|inding i|
|000007e0| 73 20 64 6f 6e 65 20 69 | 6e 20 74 68 65 20 67 6c |s done i|n the gl|
|000007f0| 6f 62 61 6c 0a 65 6e 76 | 69 72 6f 6e 6d 65 6e 74 |obal.env|ironment|
|00000800| 74 6f 70 20 6c 65 76 65 | 6c 20 65 6e 76 69 72 6f |top leve|l enviro|
|00000810| 6e 6d 65 6e 74 2e 20 41 | 6e 20 61 63 63 65 73 73 |nment. A|n access|
|00000820| 6f 72 20 70 65 72 6d 69 | 74 73 20 74 6f 20 67 65 |or permi|ts to ge|
|00000830| 74 20 61 6e 64 0a 73 65 | 74 20 74 68 65 20 76 61 |t and.se|t the va|
|00000840| 6c 75 65 20 6f 66 20 61 | 20 73 6c 6f 74 2e 20 53 |lue of a| slot. S|
|00000850| 65 74 74 69 6e 67 20 74 | 68 65 20 76 61 6c 75 65 |etting t|he value|
|00000860| 20 6f 66 20 61 20 73 6c | 6f 74 20 69 73 20 64 6f | of a sl|ot is do|
|00000870| 6e 65 20 77 69 74 68 20 | 74 68 65 20 65 78 74 65 |ne with |the exte|
|00000880| 6e 64 65 64 0a 76 65 72 | 73 69 6f 6e 20 6f 66 20 |nded.ver|sion of |
|00000890| 3c 54 54 3e 73 65 74 21 | 3c 2f 54 54 3e 73 65 74 |<TT>set!|</TT>set|
|000008a0| 21 2e 0a 0a 3c 50 3e 0a | 3c 2f 4c 49 3e 0a 3c 4c |!...<P>.|</LI>.<L|
|000008b0| 49 3e 3c 54 54 3e 3a 61 | 6c 6c 6f 63 61 74 69 6f |I><TT>:a|llocatio|
|000008c0| 6e 3c 2f 54 54 3e 3a 61 | 6c 6c 6f 63 61 74 69 6f |n</TT>:a|llocatio|
|000008d0| 6e 20 70 65 72 6d 69 74 | 73 20 74 6f 20 73 70 65 |n permit|s to spe|
|000008e0| 63 69 66 79 20 68 6f 77 | 20 73 74 6f 72 61 67 65 |cify how| storage|
|000008f0| 20 66 6f 72 0a 74 68 65 | 20 73 6c 6f 74 20 69 73 | for.the| slot is|
|00000900| 20 61 6c 6c 6f 63 61 74 | 65 64 2e 20 54 68 72 65 | allocat|ed. Thre|
|00000910| 65 20 6b 69 6e 64 73 20 | 6f 66 20 61 6c 6c 6f 63 |e kinds |of alloc|
|00000920| 61 74 69 6f 6e 20 61 72 | 65 20 70 72 6f 76 69 64 |ation ar|e provid|
|00000930| 65 64 2e 20 0a 54 68 65 | 79 20 61 72 65 20 64 65 |ed. .The|y are de|
|00000940| 73 63 72 69 62 65 64 20 | 62 65 6c 6f 77 3a 0a 20 |scribed |below:. |
|00000950| 20 0a 3c 55 4c 3e 0a 3c | 4c 49 3e 3c 54 54 3e 3a | .<UL>.<|LI><TT>:|
|00000960| 69 6e 73 74 61 6e 63 65 | 3c 2f 54 54 3e 3a 69 6e |instance|</TT>:in|
|00000970| 73 74 61 6e 63 65 20 69 | 6e 64 69 63 61 74 65 73 |stance i|ndicates|
|00000980| 20 74 68 61 74 20 65 61 | 63 68 20 69 6e 73 74 61 | that ea|ch insta|
|00000990| 6e 63 65 20 67 65 74 73 | 0a 20 20 20 20 20 69 74 |nce gets|. it|
|000009a0| 73 20 6f 77 6e 20 73 74 | 6f 72 61 67 65 20 66 6f |s own st|orage fo|
|000009b0| 72 20 74 68 65 20 73 6c | 6f 74 2e 20 54 68 69 73 |r the sl|ot. This|
|000009c0| 20 69 73 20 74 68 65 20 | 64 65 66 61 75 6c 74 2e | is the |default.|
|000009d0| 0a 3c 2f 4c 49 3e 0a 3c | 4c 49 3e 3c 54 54 3e 3a |.</LI>.<|LI><TT>:|
|000009e0| 63 6c 61 73 73 3c 2f 54 | 54 3e 3a 63 6c 61 73 73 |class</T|T>:class|
|000009f0| 20 69 6e 64 69 63 61 74 | 65 73 20 74 68 61 74 20 | indicat|es that |
|00000a00| 74 68 65 72 65 20 69 73 | 20 6f 6e 65 20 73 74 6f |there is| one sto|
|00000a10| 72 61 67 65 20 0a 20 20 | 20 20 20 6c 6f 63 61 74 |rage . | locat|
|00000a20| 69 6f 6e 20 75 73 65 64 | 20 62 79 20 61 6c 6c 20 |ion used| by all |
|00000a30| 74 68 65 20 64 69 72 65 | 63 74 20 61 6e 64 20 69 |the dire|ct and i|
|00000a40| 6e 64 69 72 65 63 74 20 | 69 6e 73 74 61 6e 63 65 |ndirect |instance|
|00000a50| 73 20 6f 66 20 74 68 65 | 20 63 6c 61 73 73 2e 20 |s of the| class. |
|00000a60| 54 68 69 73 20 0a 20 20 | 20 20 20 70 65 72 6d 69 |This . | permi|
|00000a70| 74 73 20 74 6f 20 64 65 | 66 69 6e 65 20 61 20 6b |ts to de|fine a k|
|00000a80| 69 6e 64 20 6f 66 20 67 | 6c 6f 62 61 6c 20 76 61 |ind of g|lobal va|
|00000a90| 72 69 61 62 6c 65 20 77 | 68 69 63 68 20 63 61 6e |riable w|hich can|
|00000aa0| 20 62 65 20 61 63 63 65 | 73 73 65 64 20 6f 6e 6c | be acce|ssed onl|
|00000ab0| 79 20 0a 20 20 20 20 20 | 62 79 20 28 69 6e 29 64 |y . |by (in)d|
|00000ac0| 69 72 65 63 74 20 69 6e | 73 74 61 6e 63 65 73 20 |irect in|stances |
|00000ad0| 6f 66 20 74 68 65 20 63 | 6c 61 73 73 20 77 68 69 |of the c|lass whi|
|00000ae0| 63 68 20 64 65 66 69 6e | 65 73 20 74 68 69 73 20 |ch defin|es this |
|00000af0| 73 6c 6f 74 2e 0a 3c 2f | 4c 49 3e 0a 3c 4c 49 3e |slot..</|LI>.<LI>|
|00000b00| 3c 54 54 3e 3a 76 69 72 | 74 75 61 6c 3c 2f 54 54 |<TT>:vir|tual</TT|
|00000b10| 3e 3a 76 69 72 74 75 61 | 6c 20 69 6e 64 69 63 61 |>:virtua|l indica|
|00000b20| 74 65 73 20 74 68 61 74 | 20 6e 6f 20 73 74 6f 72 |tes that| no stor|
|00000b30| 61 67 65 20 77 69 6c 6c | 0a 20 20 20 20 20 62 65 |age will|. be|
|00000b40| 20 61 6c 6c 6f 63 61 74 | 65 64 20 66 6f 72 20 74 | allocat|ed for t|
|00000b50| 68 69 73 20 73 6c 6f 74 | 2e 20 20 49 74 20 69 73 |his slot|. It is|
|00000b60| 20 75 70 20 74 6f 20 74 | 68 65 20 75 73 65 72 20 | up to t|he user |
|00000b70| 74 6f 20 64 65 66 69 6e | 65 20 61 20 67 65 74 74 |to defin|e a gett|
|00000b80| 65 72 20 0a 20 20 20 20 | 20 61 6e 64 20 61 20 73 |er . | and a s|
|00000b90| 65 74 74 65 72 20 66 75 | 6e 63 74 69 6f 6e 20 66 |etter fu|nction f|
|00000ba0| 6f 72 20 74 68 69 73 20 | 73 6c 6f 74 2e 20 54 68 |or this |slot. Th|
|00000bb0| 6f 73 65 20 66 75 6e 63 | 74 69 6f 6e 73 20 6d 75 |ose func|tions mu|
|00000bc0| 73 74 20 62 65 20 64 65 | 66 69 6e 65 64 20 77 69 |st be de|fined wi|
|00000bd0| 74 68 20 74 68 65 0a 20 | 20 20 20 20 3c 54 54 3e |th the. | <TT>|
|00000be0| 3a 73 6c 6f 74 2d 72 65 | 66 3c 2f 54 54 3e 3a 73 |:slot-re|f</TT>:s|
|00000bf0| 6c 6f 74 2d 72 65 66 0a | 20 20 20 20 20 20 61 6e |lot-ref.| an|
|00000c00| 64 20 3c 54 54 3e 3a 73 | 6c 6f 74 2d 73 65 74 21 |d <TT>:s|lot-set!|
|00000c10| 3c 2f 54 54 3e 3a 73 6c | 6f 74 2d 73 65 74 21 20 |</TT>:sl|ot-set! |
|00000c20| 6f 70 74 69 6f 6e 73 2e | 20 53 65 65 20 74 68 65 |options.| See the|
|00000c30| 20 65 78 61 6d 70 6c 65 | 20 62 65 6c 6f 77 2e 0a | example| below..|
|00000c40| 20 20 0a 3c 2f 4c 49 3e | 0a 3c 2f 55 4c 3e 0a 3c | .</LI>|.</UL>.<|
|00000c50| 2f 4c 49 3e 0a 3c 2f 55 | 4c 3e 0a 0a 3c 50 3e 0a |/LI>.</U|L>..<P>.|
|00000c60| 54 6f 20 69 6c 6c 75 73 | 74 72 61 74 65 20 73 6c |To illus|trate sl|
|00000c70| 6f 74 20 64 65 73 63 72 | 69 70 74 69 6f 6e 2c 20 |ot descr|iption, |
|00000c80| 77 65 20 73 68 61 6c 6c | 20 72 65 64 65 66 69 6e |we shall| redefin|
|00000c90| 65 20 74 68 65 20 3c 54 | 54 3e 26 6c 74 3b 63 6f |e the <T|T>&lt;co|
|00000ca0| 6d 70 6c 65 78 26 67 74 | 3b 3c 2f 54 54 3e 20 63 |mplex&gt|;</TT> c|
|00000cb0| 6c 61 73 73 20 0a 73 65 | 65 6e 20 62 65 66 6f 72 |lass .se|en befor|
|00000cc0| 65 2e 20 41 20 64 65 66 | 69 6e 69 74 69 6f 6e 20 |e. A def|inition |
|00000cd0| 63 6f 75 6c 64 20 62 65 | 3a 0a 3c 42 52 3e 0a 3c |could be|:.<BR>.<|
|00000ce0| 49 4d 47 0a 20 20 53 54 | 59 4c 45 3d 22 68 65 69 |IMG. ST|YLE="hei|
|00000cf0| 67 68 74 3a 20 32 2e 33 | 38 65 78 3b 20 76 65 72 |ght: 2.3|8ex; ver|
|00000d00| 74 69 63 61 6c 2d 61 6c | 69 67 6e 3a 20 31 37 36 |tical-al|ign: 176|
|00000d10| 2e 32 37 65 78 3b 20 22 | 20 53 52 43 3d 22 69 6d |.27ex; "| SRC="im|
|00000d20| 67 31 31 2e 70 6e 67 22 | 0a 20 41 4c 54 3d 22 5c |g11.png"|. ALT="\|
|00000d30| 62 65 67 69 6e 7b 73 63 | 68 65 6d 65 7d 0a 28 64 |begin{sc|heme}.(d|
|00000d40| 65 66 69 6e 65 2d 63 6c | 61 73 73 20 26 6c 74 3b |efine-cl|ass &lt;|
|00000d50| 63 6f 6d 70 6c 65 78 26 | 67 74 3b 20 28 26 6c 74 |complex&|gt; (&lt|
|00000d60| 3b 6e 75 6d 62 65 72 26 | 67 74 3b 29 0a 28 28 72 |;number&|gt;).((r|
|00000d70| 20 3a 69 6e 69 74 66 6f | 72 6d 20 30 20 3a 67 65 | :initfo|rm 0 :ge|
|00000d80| 74 74 65 72 20 67 65 74 | 2d 2e 2e 2e 0a 2e 2e 2e |tter get|-.......|
|00000d90| 72 29 0a 28 69 20 3a 69 | 6e 69 74 66 6f 72 6d 20 |r).(i :i|nitform |
|00000da0| 30 20 3a 67 65 74 74 65 | 72 20 67 65 74 2d 69 20 |0 :gette|r get-i |
|00000db0| 3a 73 65 74 74 65 72 20 | 73 65 74 2d 69 21 20 3a |:setter |set-i! :|
|00000dc0| 69 6e 69 74 2d 6b 65 79 | 77 6f 72 64 20 3a 69 29 |init-key|word :i)|
|00000dd0| 29 29 0a 5c 65 6e 64 7b | 73 63 68 65 6d 65 7d 22 |)).\end{|scheme}"|
|00000de0| 3e 0a 3c 42 52 3e 0a 57 | 69 74 68 20 74 68 69 73 |>.<BR>.W|ith this|
|00000df0| 20 64 65 66 69 6e 69 74 | 69 6f 6e 2c 20 74 68 65 | definit|ion, the|
|00000e00| 20 3c 54 54 3e 72 3c 2f | 54 54 3e 20 61 6e 64 20 | <TT>r</|TT> and |
|00000e10| 3c 54 54 3e 69 3c 2f 54 | 54 3e 20 73 6c 6f 74 20 |<TT>i</T|T> slot |
|00000e20| 61 72 65 20 73 65 74 20 | 74 6f 20 30 20 62 79 20 |are set |to 0 by |
|00000e30| 64 65 66 61 75 6c 74 2e | 20 0a 56 61 6c 75 65 20 |default.| .Value |
|00000e40| 6f 66 20 61 20 73 6c 6f | 74 20 63 61 6e 20 61 6c |of a slo|t can al|
|00000e50| 73 6f 20 62 65 20 73 70 | 65 63 69 66 69 65 64 20 |so be sp|ecified |
|00000e60| 62 79 20 63 61 6c 6c 69 | 6e 67 20 3c 54 54 3e 6d |by calli|ng <TT>m|
|00000e70| 61 6b 65 3c 2f 54 54 3e | 20 77 69 74 68 20 0a 74 |ake</TT>| with .t|
|00000e80| 68 65 20 3c 54 54 3e 3a | 72 3c 2f 54 54 3e 20 61 |he <TT>:|r</TT> a|
|00000e90| 6e 64 20 3c 54 54 3e 3a | 69 3c 2f 54 54 3e 20 6b |nd <TT>:|i</TT> k|
|00000ea0| 65 79 77 6f 72 64 73 2e | 20 46 75 72 74 68 65 72 |eywords.| Further|
|00000eb0| 6d 6f 72 65 2c 20 74 68 | 65 20 67 65 6e 65 72 69 |more, th|e generi|
|00000ec0| 63 20 66 75 6e 63 74 69 | 6f 6e 73 20 3c 54 54 3e |c functi|ons <TT>|
|00000ed0| 67 65 74 2d 72 3c 2f 54 | 54 3e 20 0a 61 6e 64 20 |get-r</T|T> .and |
|00000ee0| 3c 54 54 3e 73 65 74 2d | 72 21 3c 2f 54 54 3e 20 |<TT>set-|r!</TT> |
|00000ef0| 28 72 65 73 70 2e 20 3c | 54 54 3e 67 65 74 2d 69 |(resp. <|TT>get-i|
|00000f00| 3c 2f 54 54 3e 20 61 6e | 64 20 3c 54 54 3e 73 65 |</TT> an|d <TT>se|
|00000f10| 74 2d 69 21 3c 2f 54 54 | 3e 29 20 61 72 65 20 61 |t-i!</TT|>) are a|
|00000f20| 75 74 6f 6d 61 74 69 63 | 61 6c 6c 79 20 64 65 66 |utomatic|ally def|
|00000f30| 69 6e 65 64 0a 62 79 20 | 74 68 65 20 73 79 73 74 |ined.by |the syst|
|00000f40| 65 6d 20 74 6f 20 72 65 | 61 64 20 61 6e 64 20 77 |em to re|ad and w|
|00000f50| 72 69 74 65 20 74 68 65 | 20 3c 54 54 3e 72 3c 2f |rite the| <TT>r</|
|00000f60| 54 54 3e 20 28 72 65 73 | 70 2e 20 3c 54 54 3e 69 |TT> (res|p. <TT>i|
|00000f70| 3c 2f 54 54 3e 29 20 73 | 6c 6f 74 2e 0a 3c 42 52 |</TT>) s|lot..<BR|
|00000f80| 3e 0a 3c 49 4d 47 0a 20 | 20 53 54 59 4c 45 3d 22 |>.<IMG. | STYLE="|
|00000f90| 68 65 69 67 68 74 3a 20 | 32 2e 33 38 65 78 3b 20 |height: |2.38ex; |
|00000fa0| 76 65 72 74 69 63 61 6c | 2d 61 6c 69 67 6e 3a 20 |vertical|-align: |
|00000fb0| 31 37 36 2e 32 37 65 78 | 3b 20 22 20 53 52 43 3d |176.27ex|; " SRC=|
|00000fc0| 22 69 6d 67 31 32 2e 70 | 6e 67 22 0a 20 41 4c 54 |"img12.p|ng". ALT|
|00000fd0| 3d 22 5c 62 65 67 69 6e | 7b 73 63 68 65 6d 65 7d |="\begin|{scheme}|
|00000fe0| 0a 28 64 65 66 69 6e 65 | 20 63 31 20 28 6d 61 6b |.(define| c1 (mak|
|00000ff0| 65 20 26 6c 74 3b 63 6f | 6d 70 6c 65 78 26 67 74 |e &lt;co|mplex&gt|
|00001000| 3b 20 3a 72 20 31 20 3a | 69 20 32 29 29 0a 28 67 |; :r 1 :|i 2)).(g|
|00001010| 65 74 2d 72 20 63 31 29 | 20 5c 6c 65 76 20 31 0a |et-r c1)| \lev 1.|
|00001020| 28 73 65 74 2d 72 21 20 | 2e 2e 2e 0a 2e 2e 2e 65 |(set-r! |.......e|
|00001030| 66 69 6e 65 20 63 32 20 | 28 6d 61 6b 65 20 26 6c |fine c2 |(make &l|
|00001040| 74 3b 63 6f 6d 70 6c 65 | 78 26 67 74 3b 20 3a 72 |t;comple|x&gt; :r|
|00001050| 20 32 29 29 0a 28 67 65 | 74 2d 72 20 63 32 29 20 | 2)).(ge|t-r c2) |
|00001060| 5c 6c 65 76 20 32 0a 28 | 67 65 74 2d 69 20 63 32 |\lev 2.(|get-i c2|
|00001070| 29 20 5c 6c 65 76 20 30 | 0a 5c 65 6e 64 7b 73 63 |) \lev 0|.\end{sc|
|00001080| 68 65 6d 65 7d 22 3e 0a | 3c 42 52 3e 0a 0a 3c 50 |heme}">.|<BR>..<P|
|00001090| 3e 0a 41 63 63 65 73 73 | 6f 72 73 20 70 72 6f 76 |>.Access|ors prov|
|000010a0| 69 64 65 20 61 6e 20 75 | 6e 69 66 6f 72 6d 20 61 |ide an u|niform a|
|000010b0| 63 63 65 73 73 20 66 6f | 72 20 72 65 61 64 69 6e |ccess fo|r readin|
|000010c0| 67 20 61 6e 64 20 77 72 | 69 74 69 6e 67 20 61 6e |g and wr|iting an|
|000010d0| 20 6f 62 6a 65 63 74 20 | 73 6c 6f 74 2e 0a 57 72 | object |slot..Wr|
|000010e0| 69 74 69 6e 67 20 61 20 | 73 6c 6f 74 20 69 73 20 |iting a |slot is |
|000010f0| 64 6f 6e 65 20 77 69 74 | 68 20 61 6e 20 65 78 74 |done wit|h an ext|
|00001100| 65 6e 64 65 64 20 66 6f | 72 6d 20 6f 66 20 3c 54 |ended fo|rm of <T|
|00001110| 54 3e 73 65 74 21 3c 2f | 54 54 3e 73 65 74 21 0a |T>set!</|TT>set!.|
|00001120| 77 68 69 63 68 20 69 73 | 20 63 6c 6f 73 65 20 74 |which is| close t|
|00001130| 6f 20 74 68 65 20 20 43 | 6f 6d 6d 6f 6e 20 4c 69 |o the C|ommon Li|
|00001140| 73 70 20 3c 54 54 3e 73 | 65 74 66 3c 2f 54 54 3e |sp <TT>s|etf</TT>|
|00001150| 20 6d 61 63 72 6f 2e 20 | 53 6f 2c 20 61 6e 6f 74 | macro. |So, anot|
|00001160| 68 65 72 20 64 65 66 69 | 6e 69 74 69 6f 6e 20 6f |her defi|nition o|
|00001170| 66 20 74 68 65 0a 70 72 | 65 76 69 6f 75 73 20 3c |f the.pr|evious <|
|00001180| 54 54 3e 26 6c 74 3b 63 | 6f 6d 70 6c 65 78 26 67 |TT>&lt;c|omplex&g|
|00001190| 74 3b 3c 2f 54 54 3e 20 | 63 6c 61 73 73 2c 20 75 |t;</TT> |class, u|
|000011a0| 73 69 6e 67 20 74 68 65 | 20 3c 54 54 3e 3a 61 63 |sing the| <TT>:ac|
|000011b0| 63 65 73 73 6f 72 3c 2f | 54 54 3e 20 6f 70 74 69 |cessor</|TT> opti|
|000011c0| 6f 6e 2c 20 63 6f 75 6c | 64 20 62 65 3a 0a 3c 42 |on, coul|d be:.<B|
|000011d0| 52 3e 0a 3c 49 4d 47 0a | 20 20 53 54 59 4c 45 3d |R>.<IMG.| STYLE=|
|000011e0| 22 68 65 69 67 68 74 3a | 20 32 2e 33 38 65 78 3b |"height:| 2.38ex;|
|000011f0| 20 76 65 72 74 69 63 61 | 6c 2d 61 6c 69 67 6e 3a | vertica|l-align:|
|00001200| 20 31 37 36 2e 32 37 65 | 78 3b 20 22 20 53 52 43 | 176.27e|x; " SRC|
|00001210| 3d 22 69 6d 67 31 33 2e | 70 6e 67 22 0a 20 41 4c |="img13.|png". AL|
|00001220| 54 3d 22 5c 62 65 67 69 | 6e 7b 73 63 68 65 6d 65 |T="\begi|n{scheme|
|00001230| 7d 0a 28 64 65 66 69 6e | 65 2d 63 6c 61 73 73 20 |}.(defin|e-class |
|00001240| 26 6c 74 3b 63 6f 6d 70 | 6c 65 78 26 67 74 3b 20 |&lt;comp|lex&gt; |
|00001250| 28 26 6c 74 3b 6e 75 6d | 62 65 72 26 67 74 3b 29 |(&lt;num|ber&gt;)|
|00001260| 0a 28 28 72 20 3a 69 6e | 69 74 66 6f 72 6d 20 30 |.((r :in|itform 0|
|00001270| 20 3a 61 63 63 65 73 73 | 6f 72 20 72 65 2e 2e 2e | :access|or re...|
|00001280| 0a 2e 2e 2e 6b 65 79 77 | 6f 72 64 20 3a 72 29 0a |....keyw|ord :r).|
|00001290| 28 69 20 3a 69 6e 69 74 | 66 6f 72 6d 20 30 20 3a |(i :init|form 0 :|
|000012a0| 61 63 63 65 73 73 6f 72 | 20 69 6d 61 67 2d 70 61 |accessor| imag-pa|
|000012b0| 72 74 20 3a 69 6e 69 74 | 2d 6b 65 79 77 6f 72 64 |rt :init|-keyword|
|000012c0| 20 3a 69 29 29 29 0a 5c | 65 6e 64 7b 73 63 68 65 | :i))).\|end{sche|
|000012d0| 6d 65 7d 22 3e 0a 3c 42 | 52 3e 0a 0a 3c 50 3e 0a |me}">.<B|R>..<P>.|
|000012e0| 55 73 69 6e 67 20 74 68 | 69 73 20 63 6c 61 73 73 |Using th|is class|
|000012f0| 20 64 65 66 69 6e 69 74 | 69 6f 6e 2c 20 72 65 61 | definit|ion, rea|
|00001300| 64 69 6e 67 20 74 68 65 | 20 72 65 61 6c 20 70 61 |ding the| real pa|
|00001310| 72 74 20 6f 66 20 74 68 | 65 20 3c 54 54 3e 63 3c |rt of th|e <TT>c<|
|00001320| 2f 54 54 3e 20 63 6f 6d | 70 6c 65 78 20 63 61 6e |/TT> com|plex can|
|00001330| 0a 62 65 20 64 6f 6e 65 | 20 77 69 74 68 3a 0a 3c |.be done| with:.<|
|00001340| 42 52 3e 0a 3c 49 4d 47 | 0a 20 20 53 54 59 4c 45 |BR>.<IMG|. STYLE|
|00001350| 3d 22 68 65 69 67 68 74 | 3a 20 32 2e 33 38 65 78 |="height|: 2.38ex|
|00001360| 3b 20 76 65 72 74 69 63 | 61 6c 2d 61 6c 69 67 6e |; vertic|al-align|
|00001370| 3a 20 31 37 36 2e 32 37 | 65 78 3b 20 22 20 53 52 |: 176.27|ex; " SR|
|00001380| 43 3d 22 69 6d 67 31 34 | 2e 70 6e 67 22 0a 20 41 |C="img14|.png". A|
|00001390| 4c 54 3d 22 5c 62 65 67 | 69 6e 7b 73 63 68 65 6d |LT="\beg|in{schem|
|000013a0| 65 7d 0a 28 72 65 61 6c | 2d 70 61 72 74 20 63 29 |e}.(real|-part c)|
|000013b0| 0a 5c 65 6e 64 7b 73 63 | 68 65 6d 65 7d 22 3e 0a |.\end{sc|heme}">.|
|000013c0| 3c 42 52 3e 0a 61 6e 64 | 20 73 65 74 74 69 6e 67 |<BR>.and| setting|
|000013d0| 20 69 74 20 74 6f 20 74 | 68 65 20 76 61 6c 75 65 | it to t|he value|
|000013e0| 20 63 6f 6e 74 61 69 6e | 65 64 20 69 6e 20 74 68 | contain|ed in th|
|000013f0| 65 20 3c 54 54 3e 6e 65 | 77 2d 76 61 6c 75 65 3c |e <TT>ne|w-value<|
|00001400| 2f 54 54 3e 20 76 61 72 | 69 61 62 6c 65 20 0a 63 |/TT> var|iable .c|
|00001410| 61 6e 20 62 65 20 64 6f | 6e 65 20 75 73 69 6e 67 |an be do|ne using|
|00001420| 20 74 68 65 20 65 78 74 | 65 6e 64 65 64 20 66 6f | the ext|ended fo|
|00001430| 72 6d 20 6f 66 20 3c 54 | 54 3e 73 65 74 21 3c 2f |rm of <T|T>set!</|
|00001440| 54 54 3e 2e 0a 3c 42 52 | 3e 0a 3c 49 4d 47 0a 20 |TT>..<BR|>.<IMG. |
|00001450| 20 53 54 59 4c 45 3d 22 | 68 65 69 67 68 74 3a 20 | STYLE="|height: |
|00001460| 32 2e 33 38 65 78 3b 20 | 76 65 72 74 69 63 61 6c |2.38ex; |vertical|
|00001470| 2d 61 6c 69 67 6e 3a 20 | 31 37 36 2e 32 37 65 78 |-align: |176.27ex|
|00001480| 3b 20 22 20 53 52 43 3d | 22 69 6d 67 31 35 2e 70 |; " SRC=|"img15.p|
|00001490| 6e 67 22 0a 20 41 4c 54 | 3d 22 5c 62 65 67 69 6e |ng". ALT|="\begin|
|000014a0| 7b 73 63 68 65 6d 65 7d | 0a 28 73 65 74 21 20 28 |{scheme}|.(set! (|
|000014b0| 72 65 61 6c 2d 70 61 72 | 74 20 63 29 20 6e 65 77 |real-par|t c) new|
|000014c0| 2d 76 61 6c 75 65 29 0a | 5c 65 6e 64 7b 73 63 68 |-value).|\end{sch|
|000014d0| 65 6d 65 7d 22 3e 0a 3c | 42 52 3e 0a 0a 3c 50 3e |eme}">.<|BR>..<P>|
|000014e0| 0a 53 75 70 70 6f 73 65 | 20 6e 6f 77 20 74 68 61 |.Suppose| now tha|
|000014f0| 74 20 77 65 20 68 61 76 | 65 20 74 6f 20 6d 61 6e |t we hav|e to man|
|00001500| 69 70 75 6c 61 74 65 20 | 63 6f 6d 70 6c 65 78 20 |ipulate |complex |
|00001510| 6e 75 6d 62 65 72 73 20 | 77 69 74 68 20 72 65 63 |numbers |with rec|
|00001520| 74 61 6e 67 75 6c 61 72 | 0a 63 6f 6f 72 64 69 6e |tangular|.coordin|
|00001530| 61 74 65 73 20 61 73 20 | 77 65 6c 6c 20 61 73 20 |ates as |well as |
|00001540| 77 69 74 68 20 70 6f 6c | 61 72 20 63 6f 6f 72 64 |with pol|ar coord|
|00001550| 69 6e 61 74 65 73 2e 20 | 4f 6e 65 20 73 6f 6c 75 |inates. |One solu|
|00001560| 74 69 6f 6e 20 63 6f 75 | 6c 64 20 62 65 20 74 6f |tion cou|ld be to|
|00001570| 0a 68 61 76 65 20 61 20 | 64 65 66 69 6e 69 74 69 |.have a |definiti|
|00001580| 6f 6e 20 6f 66 20 63 6f | 6d 70 6c 65 78 20 6e 75 |on of co|mplex nu|
|00001590| 6d 62 65 72 73 20 77 68 | 69 63 68 20 75 73 65 73 |mbers wh|ich uses|
|000015a0| 20 6f 6e 65 20 70 61 72 | 74 69 63 75 6c 61 72 20 | one par|ticular |
|000015b0| 72 65 70 72 65 73 65 6e | 74 61 74 69 6f 6e 0a 61 |represen|tation.a|
|000015c0| 6e 64 20 73 6f 6d 65 20 | 63 6f 6e 76 65 72 73 69 |nd some |conversi|
|000015d0| 6f 6e 20 66 75 6e 63 74 | 69 6f 6e 73 20 74 6f 20 |on funct|ions to |
|000015e0| 70 61 73 73 20 66 72 6f | 6d 20 6f 6e 65 20 72 65 |pass fro|m one re|
|000015f0| 70 72 65 73 65 6e 74 61 | 74 69 6f 6e 20 74 6f 20 |presenta|tion to |
|00001600| 74 68 65 20 6f 74 68 65 | 72 2e 0a 41 20 62 65 74 |the othe|r..A bet|
|00001610| 74 65 72 20 73 6f 6c 75 | 74 69 6f 6e 20 75 73 65 |ter solu|tion use|
|00001620| 73 20 76 69 72 74 75 61 | 6c 20 73 6c 6f 74 73 2e |s virtua|l slots.|
|00001630| 20 41 20 63 6f 6d 70 6c | 65 74 65 20 64 65 66 69 | A compl|ete defi|
|00001640| 6e 69 74 69 6f 6e 20 6f | 66 20 74 68 65 20 3c 54 |nition o|f the <T|
|00001650| 54 3e 26 6c 74 3b 63 6f | 6d 70 6c 65 78 26 67 74 |T>&lt;co|mplex&gt|
|00001660| 3b 3c 2f 54 54 3e 0a 63 | 6c 61 73 73 20 75 73 69 |;</TT>.c|lass usi|
|00001670| 6e 67 20 76 69 72 74 75 | 61 6c 20 73 6c 6f 74 73 |ng virtu|al slots|
|00001680| 20 69 73 20 67 69 76 65 | 6e 20 69 6e 20 46 69 67 | is give|n in Fig|
|00001690| 75 72 65 26 6e 62 73 70 | 3b 32 2e 0a 0a 3c 44 49 |ure&nbsp|;2...<DI|
|000016a0| 56 20 63 6c 61 73 73 3d | 22 43 45 4e 54 45 52 22 |V class=|"CENTER"|
|000016b0| 3e 3c 41 20 49 44 3d 22 | 33 32 30 22 3e 3c 2f 41 |><A ID="|320"></A|
|000016c0| 3e 0a 3c 54 41 42 4c 45 | 3e 0a 3c 43 41 50 54 49 |>.<TABLE|>.<CAPTI|
|000016d0| 4f 4e 20 63 6c 61 73 73 | 3d 22 42 4f 54 54 4f 4d |ON class|="BOTTOM|
|000016e0| 22 3e 3c 53 54 52 4f 4e | 47 3e 46 69 67 75 72 65 |"><STRON|G>Figure|
|000016f0| 3a 3c 2f 53 54 52 4f 4e | 47 3e 0a 3c 45 4d 3e 41 |:</STRON|G>.<EM>A|
|00001700| 20 3c 2f 45 4d 3e 3c 54 | 54 3e 26 6c 74 3b 63 6f | </EM><T|T>&lt;co|
|00001710| 6d 70 6c 65 78 26 67 74 | 3b 3c 2f 54 54 3e 3c 45 |mplex&gt|;</TT><E|
|00001720| 4d 3e 20 6e 75 6d 62 65 | 72 20 63 6c 61 73 73 20 |M> numbe|r class |
|00001730| 64 65 66 69 6e 69 74 69 | 6f 6e 20 75 73 69 6e 67 |definiti|on using|
|00001740| 20 76 69 72 74 75 61 6c | 20 73 6c 6f 74 73 3c 2f | virtual| slots</|
|00001750| 45 4d 3e 3c 2f 43 41 50 | 54 49 4f 4e 3e 0a 3c 54 |EM></CAP|TION>.<T|
|00001760| 52 3e 3c 54 44 3e 3c 49 | 4d 47 0a 20 53 54 59 4c |R><TD><I|MG. STYL|
|00001770| 45 3d 22 22 20 53 52 43 | 3d 22 69 6d 67 31 36 2e |E="" SRC|="img16.|
|00001780| 70 6e 67 22 0a 20 41 4c | 54 3d 22 5c 62 65 67 69 |png". AL|T="\begi|
|00001790| 6e 7b 66 69 67 75 72 65 | 7d 7b 5c 66 6f 6f 74 6e |n{figure|}{\footn|
|000017a0| 6f 74 65 73 69 7a 65 0a | 5c 62 65 67 69 6e 7b 71 |otesize.|\begin{q|
|000017b0| 75 6f 74 65 7d 0a 5c 62 | 65 67 69 6e 7b 71 75 6f |uote}.\b|egin{quo|
|000017c0| 74 65 7d 0a 5c 62 65 67 | 69 6e 7b 76 65 72 62 61 |te}.\beg|in{verba|
|000017d0| 74 69 6d 7d 28 64 65 66 | 69 2e 2e 2e 0a 2e 2e 2e |tim}(def|i.......|
|000017e0| 73 65 74 21 20 6f 20 27 | 69 20 28 2a 20 6d 20 28 |set! o '|i (* m (|
|000017f0| 73 69 6e 20 61 29 29 29 | 29 29 29 29 29 5c 65 6e |sin a)))|)))))\en|
|00001800| 64 7b 76 65 72 62 61 74 | 69 6d 7d 0a 5c 65 6e 64 |d{verbat|im}.\end|
|00001810| 7b 71 75 6f 74 65 7d 5c | 65 6e 64 7b 71 75 6f 74 |{quote}\|end{quot|
|00001820| 65 7d 7d 0a 5c 65 6e 64 | 7b 66 69 67 75 72 65 7d |e}}.\end|{figure}|
|00001830| 22 3e 3c 2f 54 44 3e 3c | 2f 54 52 3e 0a 3c 2f 54 |"></TD><|/TR>.</T|
|00001840| 41 42 4c 45 3e 0a 3c 2f | 44 49 56 3e 0a 0a 3c 50 |ABLE>.</|DIV>..<P|
|00001850| 3e 0a 0a 3c 50 3e 3c 50 | 3e 0a 3c 42 52 3e 0a 54 |>..<P><P|>.<BR>.T|
|00001860| 68 69 73 20 63 6c 61 73 | 73 20 64 65 66 69 6e 69 |his clas|s defini|
|00001870| 74 69 6f 6e 20 69 6d 70 | 6c 65 6d 65 6e 74 73 20 |tion imp|lements |
|00001880| 74 77 6f 20 72 65 61 6c | 20 73 6c 6f 74 73 20 28 |two real| slots (|
|00001890| 3c 54 54 3e 72 3c 2f 54 | 54 3e 20 61 6e 64 20 3c |<TT>r</T|T> and <|
|000018a0| 54 54 3e 69 3c 2f 54 54 | 3e 29 2e 20 56 61 6c 75 |TT>i</TT|>). Valu|
|000018b0| 65 73 0a 6f 66 20 74 68 | 65 20 3c 54 54 3e 6d 3c |es.of th|e <TT>m<|
|000018c0| 2f 54 54 3e 20 61 6e 64 | 20 3c 54 54 3e 61 3c 2f |/TT> and| <TT>a</|
|000018d0| 54 54 3e 20 76 69 72 74 | 75 61 6c 20 73 6c 6f 74 |TT> virt|ual slot|
|000018e0| 73 20 61 72 65 20 63 61 | 6c 63 75 6c 61 74 65 64 |s are ca|lculated|
|000018f0| 20 66 72 6f 6d 20 72 65 | 61 6c 20 73 6c 6f 74 0a | from re|al slot.|
|00001900| 76 61 6c 75 65 73 2e 20 | 52 65 61 64 69 6e 67 20 |values. |Reading |
|00001910| 61 20 76 69 72 74 75 61 | 6c 20 73 6c 6f 74 20 6c |a virtua|l slot l|
|00001920| 65 61 64 73 20 74 6f 20 | 74 68 65 20 61 70 70 6c |eads to |the appl|
|00001930| 69 63 61 74 69 6f 6e 20 | 6f 66 20 74 68 65 20 66 |ication |of the f|
|00001940| 75 6e 63 74 69 6f 6e 0a | 64 65 66 69 6e 65 64 20 |unction.|defined |
|00001950| 69 6e 20 74 68 65 20 3c | 54 54 3e 3a 73 6c 6f 74 |in the <|TT>:slot|
|00001960| 2d 72 65 66 3c 2f 54 54 | 3e 3a 73 6c 6f 74 2d 72 |-ref</TT|>:slot-r|
|00001970| 65 66 20 6f 70 74 69 6f | 6e 2e 20 57 72 69 74 69 |ef optio|n. Writi|
|00001980| 6e 67 20 73 75 63 68 20 | 61 20 73 6c 6f 74 20 0a |ng such |a slot .|
|00001990| 6c 65 61 64 73 20 74 6f | 20 74 68 65 20 61 70 70 |leads to| the app|
|000019a0| 6c 69 63 61 74 69 6f 6e | 20 6f 66 20 74 68 65 20 |lication| of the |
|000019b0| 66 75 6e 63 74 69 6f 6e | 20 64 65 66 69 6e 65 64 |function| defined|
|000019c0| 20 69 6e 20 74 68 65 20 | 3c 54 54 3e 3a 73 6c 6f | in the |<TT>:slo|
|000019d0| 74 2d 73 65 74 21 3c 2f | 54 54 3e 3a 73 6c 6f 74 |t-set!</|TT>:slot|
|000019e0| 2d 73 65 74 21 20 6f 70 | 74 69 6f 6e 2e 0a 46 6f |-set! op|tion..Fo|
|000019f0| 72 20 69 6e 73 74 61 6e | 63 65 2c 20 74 68 65 20 |r instan|ce, the |
|00001a00| 66 6f 6c 6c 6f 77 69 6e | 67 20 65 78 70 72 65 73 |followin|g expres|
|00001a10| 73 69 6f 6e 0a 3c 42 52 | 3e 0a 3c 49 4d 47 0a 20 |sion.<BR|>.<IMG. |
|00001a20| 20 53 54 59 4c 45 3d 22 | 68 65 69 67 68 74 3a 20 | STYLE="|height: |
|00001a30| 31 39 36 2e 32 35 65 78 | 3b 20 76 65 72 74 69 63 |196.25ex|; vertic|
|00001a40| 61 6c 2d 61 6c 69 67 6e | 3a 20 2d 30 2e 37 30 65 |al-align|: -0.70e|
|00001a50| 78 3b 20 22 20 53 52 43 | 3d 22 69 6d 67 31 37 2e |x; " SRC|="img17.|
|00001a60| 70 6e 67 22 0a 20 41 4c | 54 3d 22 5c 62 65 67 69 |png". AL|T="\begi|
|00001a70| 6e 7b 73 63 68 65 6d 65 | 7d 0a 28 73 6c 6f 74 2d |n{scheme|}.(slot-|
|00001a80| 73 65 74 21 20 63 20 27 | 61 20 33 29 0a 5c 65 6e |set! c '|a 3).\en|
|00001a90| 64 7b 73 63 68 65 6d 65 | 7d 22 3e 0a 3c 42 52 3e |d{scheme|}">.<BR>|
|00001aa0| 0a 70 65 72 6d 69 74 73 | 20 74 6f 20 73 65 74 20 |.permits| to set |
|00001ab0| 74 68 65 20 61 6e 67 6c | 65 20 6f 66 20 74 68 65 |the angl|e of the|
|00001ac0| 20 3c 54 54 3e 63 3c 2f | 54 54 3e 20 63 6f 6d 70 | <TT>c</|TT> comp|
|00001ad0| 6c 65 78 20 6e 75 6d 62 | 65 72 2e 20 54 68 69 73 |lex numb|er. This|
|00001ae0| 20 65 78 70 72 65 73 73 | 69 6f 6e 0a 63 6f 6e 64 | express|ion.cond|
|00001af0| 75 63 74 73 2c 20 69 6e | 20 66 61 63 74 2c 20 74 |ucts, in| fact, t|
|00001b00| 6f 20 74 68 65 20 65 76 | 61 6c 75 61 74 69 6f 6e |o the ev|aluation|
|00001b10| 20 6f 66 20 74 68 65 20 | 66 6f 6c 6c 6f 77 69 6e | of the |followin|
|00001b20| 67 20 65 78 70 72 65 73 | 73 69 6f 6e 0a 3c 42 52 |g expres|sion.<BR|
|00001b30| 3e 0a 3c 49 4d 47 0a 20 | 20 53 54 59 4c 45 3d 22 |>.<IMG. | STYLE="|
|00001b40| 68 65 69 67 68 74 3a 20 | 32 2e 33 38 65 78 3b 20 |height: |2.38ex; |
|00001b50| 76 65 72 74 69 63 61 6c | 2d 61 6c 69 67 6e 3a 20 |vertical|-align: |
|00001b60| 31 37 36 2e 32 37 65 78 | 3b 20 22 20 53 52 43 3d |176.27ex|; " SRC=|
|00001b70| 22 69 6d 67 31 38 2e 70 | 6e 67 22 0a 20 41 4c 54 |"img18.p|ng". ALT|
|00001b80| 3d 22 5c 62 65 67 69 6e | 7b 73 63 68 65 6d 65 7d |="\begin|{scheme}|
|00001b90| 0a 28 28 6c 61 6d 62 64 | 61 20 6f 20 6d 29 0a 28 |.((lambd|a o m).(|
|00001ba0| 6c 65 74 20 28 28 6d 20 | 28 73 6c 6f 74 2d 72 65 |let ((m |(slot-re|
|00001bb0| 66 20 6f 20 27 6d 29 29 | 29 0a 28 73 6c 6f 74 2d |f o 'm))|).(slot-|
|00001bc0| 73 65 74 21 20 6f 20 27 | 72 20 28 2a 20 6d 20 28 |set! o '|r (* m (|
|00001bd0| 63 6f 73 20 61 29 29 29 | 0a 28 73 6c 6f 74 2d 73 |cos a)))|.(slot-s|
|00001be0| 65 74 21 20 6f 20 27 69 | 20 28 2a 20 6d 20 28 73 |et! o 'i| (* m (s|
|00001bf0| 69 6e 20 61 29 29 29 29 | 0a 63 20 33 29 0a 5c 65 |in a))))|.c 3).\e|
|00001c00| 6e 64 7b 73 63 68 65 6d | 65 7d 22 3e 0a 3c 42 52 |nd{schem|e}">.<BR|
|00001c10| 3e 0a 41 20 6d 6f 72 65 | 20 63 6f 6d 70 6c 65 74 |>.A more| complet|
|00001c20| 65 20 65 78 61 6d 70 6c | 65 20 69 73 20 67 69 76 |e exampl|e is giv|
|00001c30| 65 6e 20 62 65 6c 6f 77 | 3a 0a 3c 42 52 3e 0a 3c |en below|:.<BR>.<|
|00001c40| 49 4d 47 0a 20 20 53 54 | 59 4c 45 3d 22 68 65 69 |IMG. ST|YLE="hei|
|00001c50| 67 68 74 3a 20 32 2e 33 | 38 65 78 3b 20 76 65 72 |ght: 2.3|8ex; ver|
|00001c60| 74 69 63 61 6c 2d 61 6c | 69 67 6e 3a 20 31 37 36 |tical-al|ign: 176|
|00001c70| 2e 32 37 65 78 3b 20 22 | 20 53 52 43 3d 22 69 6d |.27ex; "| SRC="im|
|00001c80| 67 31 39 2e 70 6e 67 22 | 0a 20 41 4c 54 3d 22 5c |g19.png"|. ALT="\|
|00001c90| 62 65 67 69 6e 7b 73 63 | 68 65 6d 65 7d 0a 28 64 |begin{sc|heme}.(d|
|00001ca0| 65 66 69 6e 65 20 63 20 | 28 6d 61 6b 65 20 26 6c |efine c |(make &l|
|00001cb0| 74 3b 63 6f 6d 70 6c 65 | 78 26 67 74 3b 20 3a 72 |t;comple|x&gt; :r|
|00001cc0| 20 31 32 20 3a 69 20 32 | 30 29 29 0a 28 72 65 61 | 12 :i 2|0)).(rea|
|00001cd0| 6c 2d 70 61 72 74 20 63 | 29 20 5c 6c 65 76 20 31 |l-part c|) \lev 1|
|00001ce0| 32 0a 28 61 6e 2e 2e 2e | 0a 2e 2e 2e 74 73 20 61 |2.(an...|....ts a|
|00001cf0| 72 65 3a 0a 72 20 3d 20 | 31 0a 69 20 3d 20 31 30 |re:.r = |1.i = 10|
|00001d00| 0a 6d 20 3d 20 31 30 2e | 30 34 39 38 37 35 36 32 |.m = 10.|04987562|
|00001d10| 31 31 32 30 39 0a 61 20 | 3d 20 31 2e 34 37 31 31 |11209.a |= 1.4711|
|00001d20| 32 37 36 37 34 33 30 33 | 37 33 0a 5c 65 6e 64 7b |27674303|73.\end{|
|00001d30| 73 63 68 65 6d 65 7d 22 | 3e 0a 3c 42 52 3e 0a 0a |scheme}"|>.<BR>..|
|00001d40| 3c 50 3e 0a 53 69 6e 63 | 65 20 69 6e 69 74 69 61 |<P>.Sinc|e initia|
|00001d50| 6c 69 7a 61 74 69 6f 6e | 20 6b 65 79 77 6f 72 64 |lization| keyword|
|00001d60| 73 20 68 61 76 65 20 62 | 65 65 6e 20 64 65 66 69 |s have b|een defi|
|00001d70| 6e 65 64 20 66 6f 72 20 | 74 68 65 20 66 6f 75 72 |ned for |the four|
|00001d80| 20 73 6c 6f 74 73 2c 20 | 77 65 0a 63 61 6e 20 6e | slots, |we.can n|
|00001d90| 6f 77 20 64 65 66 69 6e | 65 20 74 68 65 20 6d 61 |ow defin|e the ma|
|00001da0| 6b 65 2d 72 65 63 74 61 | 6e 67 75 6c 61 72 20 61 |ke-recta|ngular a|
|00001db0| 6e 64 20 6d 61 6b 65 2d | 70 6f 6c 61 72 0a 73 74 |nd make-|polar.st|
|00001dc0| 61 6e 64 61 72 64 20 53 | 63 68 65 6d 65 20 70 72 |andard S|cheme pr|
|00001dd0| 69 6d 69 74 69 76 65 73 | 2e 0a 3c 42 52 3e 0a 3c |imitives|..<BR>.<|
|00001de0| 49 4d 47 0a 20 20 53 54 | 59 4c 45 3d 22 68 65 69 |IMG. ST|YLE="hei|
|00001df0| 67 68 74 3a 20 32 2e 33 | 38 65 78 3b 20 76 65 72 |ght: 2.3|8ex; ver|
|00001e00| 74 69 63 61 6c 2d 61 6c | 69 67 6e 3a 20 31 37 36 |tical-al|ign: 176|
|00001e10| 2e 32 37 65 78 3b 20 22 | 20 53 52 43 3d 22 69 6d |.27ex; "| SRC="im|
|00001e20| 67 32 30 2e 70 6e 67 22 | 0a 20 41 4c 54 3d 22 5c |g20.png"|. ALT="\|
|00001e30| 62 65 67 69 6e 7b 73 63 | 68 65 6d 65 7d 0a 28 64 |begin{sc|heme}.(d|
|00001e40| 65 66 69 6e 65 20 6d 61 | 6b 65 2d 72 65 63 74 61 |efine ma|ke-recta|
|00001e50| 6e 67 75 6c 61 72 0a 28 | 6c 61 6d 62 64 61 20 28 |ngular.(|lambda (|
|00001e60| 78 20 79 29 20 28 6d 61 | 6b 65 20 26 6c 74 3b 63 |x y) (ma|ke &lt;c|
|00001e70| 6f 6d 70 6c 65 78 26 67 | 74 3b 20 3a 72 20 78 20 |omplex&g|t; :r x |
|00001e80| 3a 69 20 2e 2e 2e 0a 2e | 2e 2e 20 6d 61 6b 65 2d |:i .....|.. make-|
|00001e90| 70 6f 6c 61 72 0a 28 6c | 61 6d 62 64 61 20 28 78 |polar.(l|ambda (x|
|00001ea0| 20 79 29 20 28 6d 61 6b | 65 20 26 6c 74 3b 63 6f | y) (mak|e &lt;co|
|00001eb0| 6d 70 6c 65 78 26 67 74 | 3b 20 3a 6d 61 67 6e 20 |mplex&gt|; :magn |
|00001ec0| 78 20 3a 61 6e 67 6c 65 | 20 79 29 29 29 0a 5c 70 |x :angle| y))).\p|
|00001ed0| 61 72 0a 5c 65 6e 64 7b | 73 63 68 65 6d 65 7d 22 |ar.\end{|scheme}"|
|00001ee0| 3e 0a 3c 42 52 3e 0a 0a | 3c 50 3e 0a 0a 3c 48 52 |>.<BR>..|<P>..<HR|
|00001ef0| 3e 0a 0a 3c 2f 42 4f 44 | 59 3e 0a 3c 2f 48 54 4d |>..</BOD|Y>.</HTM|
|00001f00| 4c 3e 0a | |L>. | |
+--------+-------------------------+-------------------------+--------+--------+